import unittest


class AssertUtil(unittest.TestCase):

    def assertFunc(self, expect, resp, actual):
        self.assertEqual(resp.status_code, resp.status_code)
        self.assertEqual(expect.get('success'), actual.get('success'))
        self.assertEqual(expect.get('code'), actual.get('code'))
        self.assertIn(expect.get('message'), actual.get('message'))

    def assert_multi(self, resp, resp_data, expect_result):
        self.assertEqual(resp.status_code, expect_result.get('status_code'))
        self.assertEqual(resp_data.get('success'), expect_result.get('success'))
        self.assertEqual(resp_data.get('code'), expect_result.get('code'))
        self.assertEqual(resp_data.get('message'), expect_result.get('message'))